home *** CD-ROM | disk | FTP | other *** search
- /***
- * CADSP
- *
- * AppleTalk Data Stream Protocol handler
- *
- * ask this object to handle connections over appletalk
- *
- * Copyright © 1992 Bernard Bernstein. All rights reserved.
- ***/
-
- #pragma once
-
- #include <CObject.h>
- #include <ADSP.h>
-
- #define uPtr unsigned char *
-
- class CADSP : public CObject {
-
- public:
-
-
- protected:
-
- /* allocate and deallocate stuff */
-
- void IADSP(short queueSize, short dataSize);
- void Dispose(void);
-
-
- /* accessing stuff */
- short DSPioResult(void);
-
-
- /* establishing and terminating connection */
-
- void DSPInit(short *socket);
- void DSPOptions(short sendBlocking, short badSeqMax, char useCheckSum);
- void DSPOpen(AddrBlock addr, unsigned char ocMode);
- void DSPClose(void);
- void DSPRemove(void);
-
-
- /* maintaining a connection */
-
- void DSPStatus(short *sendPending, short *sendAvail,
- short *recvPending, short *recvAvail);
- void DSPRead(void *buffer, short amountToRead, short *amountRead);
- void DSPWrite(void *buffer, short amountToWrite);
-
-
- private:
-
- Boolean initialized;
- Boolean opened;
-
- short itsDspRefNum; // driver reference num
- short itsQueueSize; // size of internal queue
-
- DSPPBPtr itsDsppb; // the parameter block for ADSP
-
- // pointers owned by ADSP
- Ptr dspRecvQ;
- Ptr dspSendQ;
- Ptr dspAttnBuf;
- Ptr itsInBuf;
- Ptr itsOutBuf;
- Ptr itsAttnBuf;
-
- TPCCB itsCcb; // the CCB (owned by ADSP)
-
- };
-
-